package com.fymxy.question_bank_management.service.serviceImpl;

import com.fymxy.question_bank_management.mapper.Student2courseMapper;
import com.fymxy.question_bank_management.pojo.Student2courseKey;
import com.fymxy.question_bank_management.service.Student2courseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class Student2courseServiceImpl implements Student2courseService {

    @Autowired
    private Student2courseMapper student2courseMapper;

    @Override
    public int deleteByCourseKey(Integer courseNo) {
        return student2courseMapper.deleteByCourseKey(courseNo);
    }

    @Override
    public int insert(Student2courseKey record) {
        return student2courseMapper.insert(record);
    }

    @Override
    public int deleteStudentFromCourse(int courseNo, int studentNo) {
        return student2courseMapper.deleteStudentFromCourse(courseNo,studentNo);
    }
}
